//
//  FuJinXiangqingERTableViewCell.m
//  GOGOTravel
//
//  Created by dllo on 16/3/5.
//  Copyright © 2016年 果果. All rights reserved.
//

#import "FuJinXiangqingERTableViewCell.h"
#import "FUjinxiangQing.h"
@implementation FuJinXiangqingERTableViewCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        
        self.label = [[BaseLabel alloc] init];
        [self.contentView addSubview:_label];
        [_label release];
        
        self.label2 = [[UILabel alloc] init];
        [self.contentView addSubview:_label2];
        [_label2 release];
        
        self.button = [UIButton buttonWithType:UIButtonTypeCustom];
        [self.contentView addSubview:_button];
        
       
        self.lineView = [[UIView alloc] init];
        [self.contentView addSubview:_lineView];
        [_lineView release];
        
        
        
    }
    return self;
}


- (void)setModel:(FUjinxiangQing *)model{
    
    if (_model != model) {
        [_model release];
        _model = [model retain];
    }
    
    
    
    _label.text = [NSString stringWithFormat:@"%@ :", model.title1];
    
    if ([model.text1 isEqual:[NSNull null]] || [model.text1 isEqualToString:@""]){
        _label2.text = @"暂无信息";
    }else{
        _label2.text = model.text1;
        _label2.textColor = [UIColor colorWithRed:0.8 green:0.61 blue:0.11 alpha:1];
    }
    
    
    
}


- (void)layoutSubviews{
    
    ;
    
    _label.frame = CGRectMake(15, 5, 200, 30);
  
    _label.font = [UIFont systemFontOfSize:20];
    _label.textColor = UIColorFromRGB(0x099cc);
    
    
    _label2.frame = CGRectMake(5, 50, self.frame.size.width - 50, 100);
    _label2.textColor = [UIColor colorWithRed:0.8 green:0.61 blue:0.11 alpha:1];
    _label2.numberOfLines = 5;
    _button.frame = CGRectMake(self.frame.size.width - 40, 50, 20, 30);
    
    [_button setBackgroundImage:[UIImage imageNamed:@"iconfont-iconfontsvgarrowsright-2.png"] forState:UIControlStateNormal];
    _lineView.frame = CGRectMake(10, 155, [UIScreen mainScreen].bounds.size.width - 20, 1);
    _lineView.backgroundColor = [UIColor grayColor];
}


- (void)dealloc{
    [_button release];
    [_view22 release];
    [_model release];
    [_lineView release];
    [_label release];
    [_label2 release];
    [super dealloc];
}


- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
